<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org"  xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
    <title>实验室助理工作管理系统</title>
    <link rel="icon" href="favicon.ico" type="image/ico">
    <meta name="keywords" content="LightYear,光年,后台模板,后台管理系统,光年HTML模板">
    <meta name="description" content="LightYear是一个基于Bootstrap v3.3.7的后台管理系统的HTML模板。">
    <meta name="author" content="yinqi">
    <link rel="stylesheet" th:href="@{/Light-Year-Admin/css/bootstrap.min.css}">
    <link rel="stylesheet" th:href="@{/Light-Year-Admin/css/materialdesignicons.min.css}">
    <link rel="stylesheet" th:href="@{/Light-Year-Admin/css/style.min.css}">
    <!--对话框-->
    <link rel="stylesheet" th:href="@{/Light-Year-Admin/js/jconfirm/jquery-confirm.min.css}">
</head>

<body>
<div class="lyear-layout-web">
    <div class="lyear-layout-container">
        <!--左侧导航-->
        <aside class="lyear-layout-sidebar">

            <!-- logo -->
            <div id="logo" class="sidebar-header" style="width: 240px;height: 68px">
                <a href="index.html" style="font-size: 20px">实验室助理工作管理系统</a>
            </div>
            <div class="lyear-layout-sidebar-scroll">

                <nav class="sidebar-main">
                    <ul class="nav nav-drawer">
                        <li class="nav-item active"> <a href="/toMain"><i class="mdi mdi-home"></i>首页</a> </li>
                        <li class="nav-item nav-item-has-subnav" shiro:hasPermission="admin">
                            <a href="javascript:void(0)"><i class="mdi mdi-palette"></i>系统管理员</a>
                            <ul class="nav nav-subnav">
                                <li> <a href="/toLab">实验室管理</a> </li>
                                <li> <a href="/toDepartment">部门管理</a> </li>
<!--                                <li> <a href="">二级学院管理</a> </li>-->
                                <li> <a href="/toLabTechnician">实验室技术员信息管理</a> </li>
                            </ul>
                        </li>
                        <li class="nav-item nav-item-has-subnav" shiro:hasPermission="student">
                            <a href="javascript:void(0)"><i class="mdi mdi-format-align-justify"></i>学生</a>
                            <ul class="nav nav-subnav">
                                <li> <a href="/toStudentPlan">查看实验室助理招聘计划信息</a> </li>
                                <li> <a href="/toSeeInterview">查看面试信息</a> </li>
                            </ul>
                        </li>
                        <li class="nav-item nav-item-has-subnav" shiro:hasPermission="technician">
                            <a href="javascript:void(0)"><i class="mdi mdi-file-outline"></i>实验技术员</a>
                            <ul class="nav nav-subnav">
                                <li> <a href="/toRecruitmentPlan">查看招聘计划</a> </li>
                                <li> <a href="/toReviewStudent">审核报名信息</a> </li>
                                <li> <a href="/toAudition">审核面试信息</a> </li>
                                <li> <a href="/toAssistantInformation">人员档案信息</a> </li>
                                <li> <a href="/SeeAssistant">查看助理工作内容</a> </li>
                                <li> <a href="/SeeRepair">查看设备维修申请</a> </li>
                            </ul>
                        </li>
                        <li class="nav-item nav-item-has-subnav" shiro:hasPermission="studentOffice">
                            <a href="javascript:void(0)"><i class="mdi mdi-language-javascript"></i>学生工作处</a>
                            <ul class="nav nav-subnav">
                                <li> <a href="/toStudentOffice">审核招聘计划</a> </li>
                            </ul>
                        </li>
                        <li class="nav-item nav-item-has-subnav" shiro:hasPermission="assistant">
                            <a href="javascript:void(0)"><i class="mdi mdi-language-javascript"></i>实验室助理</a>
                            <ul class="nav nav-subnav">
                                <li> <a href="/toAssistant">记录工作内容</a> </li>
                                <li> <a href="/toRepair">设备维修申请</a> </li>
                            </ul>
                        </li>
                    </ul>
                </nav>

                <div class="sidebar-footer">
                    <p class="copyright">Copyright &copy; 2021. <a target="_blank" href="">ZLC</a> All rights reserved.</p>
                </div>
            </div>

        </aside>
        <!--End 左侧导航-->

        <!--头部信息-->
        <header class="lyear-layout-header">

            <nav class="navbar navbar-default">
                <div class="topbar">

                    <div class="topbar-left">
                        <div class="lyear-aside-toggler">
                            <span class="lyear-toggler-bar"></span>
                            <span class="lyear-toggler-bar"></span>
                            <span class="lyear-toggler-bar"></span>
                        </div>
                        <span class="navbar-page-title">首页</span>
                    </div>

                    <ul class="topbar-right">
                        <li class="dropdown dropdown-profile">
                            <a href="javascript:void(0)" data-toggle="dropdown">
                                <span><span id="name1"></span><span class="caret"></span></span>
                            </a>
                            <ul class="dropdown-menu dropdown-menu-right">
                                <li> <a><i class="mdi mdi-account"></i> 个人信息</a> </li>
                                <li> <a href=""><i class="mdi mdi-lock-outline"></i> 修改密码</a> </li>
                                <li class="divider"></li>
                                <li> <a href="" onclick="signout()"><i class="mdi mdi-logout-variant"></i> 退出登录</a> </li>
                            </ul>
                        </li>
                        <!--切换主题配色-->
                        <li class="dropdown dropdown-skin">
                            <span data-toggle="dropdown" class="icon-palette"><i class="mdi mdi-palette"></i></span>
                            <ul class="dropdown-menu dropdown-menu-right" data-stopPropagation="true">
                                <li class="drop-title"><p>主题</p></li>
                                <li class="drop-skin-li clearfix">
                  <span class="inverse">
                    <input type="radio" name="site_theme" value="default" id="site_theme_1" checked>
                    <label for="site_theme_1"></label>
                  </span>
                                    <span>
                    <input type="radio" name="site_theme" value="dark" id="site_theme_2">
                    <label for="site_theme_2"></label>
                  </span>
                                    <span>
                    <input type="radio" name="site_theme" value="translucent" id="site_theme_3">
                    <label for="site_theme_3"></label>
                  </span>
                                </li>
                                <li class="drop-title"><p>LOGO</p></li>
                                <li class="drop-skin-li clearfix">
                  <span class="inverse">
                    <input type="radio" name="logo_bg" value="default" id="logo_bg_1" checked>
                    <label for="logo_bg_1"></label>
                  </span>
                                    <span>
                    <input type="radio" name="logo_bg" value="color_2" id="logo_bg_2">
                    <label for="logo_bg_2"></label>
                  </span>
                                    <span>
                    <input type="radio" name="logo_bg" value="color_3" id="logo_bg_3">
                    <label for="logo_bg_3"></label>
                  </span>
                                    <span>
                    <input type="radio" name="logo_bg" value="color_4" id="logo_bg_4">
                    <label for="logo_bg_4"></label>
                  </span>
                                    <span>
                    <input type="radio" name="logo_bg" value="color_5" id="logo_bg_5">
                    <label for="logo_bg_5"></label>
                  </span>
                                    <span>
                    <input type="radio" name="logo_bg" value="color_6" id="logo_bg_6">
                    <label for="logo_bg_6"></label>
                  </span>
                                    <span>
                    <input type="radio" name="logo_bg" value="color_7" id="logo_bg_7">
                    <label for="logo_bg_7"></label>
                  </span>
                                    <span>
                    <input type="radio" name="logo_bg" value="color_8" id="logo_bg_8">
                    <label for="logo_bg_8"></label>
                  </span>
                                </li>
                                <li class="drop-title"><p>头部</p></li>
                                <li class="drop-skin-li clearfix">
                  <span class="inverse">
                    <input type="radio" name="header_bg" value="default" id="header_bg_1" checked>
                    <label for="header_bg_1"></label>
                  </span>
                                    <span>
                    <input type="radio" name="header_bg" value="color_2" id="header_bg_2">
                    <label for="header_bg_2"></label>
                  </span>
                                    <span>
                    <input type="radio" name="header_bg" value="color_3" id="header_bg_3">
                    <label for="header_bg_3"></label>
                  </span>
                                    <span>
                    <input type="radio" name="header_bg" value="color_4" id="header_bg_4">
                    <label for="header_bg_4"></label>
                  </span>
                                    <span>
                    <input type="radio" name="header_bg" value="color_5" id="header_bg_5">
                    <label for="header_bg_5"></label>
                  </span>
                                    <span>
                    <input type="radio" name="header_bg" value="color_6" id="header_bg_6">
                    <label for="header_bg_6"></label>
                  </span>
                                    <span>
                    <input type="radio" name="header_bg" value="color_7" id="header_bg_7">
                    <label for="header_bg_7"></label>
                  </span>
                                    <span>
                    <input type="radio" name="header_bg" value="color_8" id="header_bg_8">
                    <label for="header_bg_8"></label>
                  </span>
                                </li>
                                <li class="drop-title"><p>侧边栏</p></li>
                                <li class="drop-skin-li clearfix">
                  <span class="inverse">
                    <input type="radio" name="sidebar_bg" value="default" id="sidebar_bg_1" checked>
                    <label for="sidebar_bg_1"></label>
                  </span>
                                    <span>
                    <input type="radio" name="sidebar_bg" value="color_2" id="sidebar_bg_2">
                    <label for="sidebar_bg_2"></label>
                  </span>
                                    <span>
                    <input type="radio" name="sidebar_bg" value="color_3" id="sidebar_bg_3">
                    <label for="sidebar_bg_3"></label>
                  </span>
                                    <span>
                    <input type="radio" name="sidebar_bg" value="color_4" id="sidebar_bg_4">
                    <label for="sidebar_bg_4"></label>
                  </span>
                                    <span>
                    <input type="radio" name="sidebar_bg" value="color_5" id="sidebar_bg_5">
                    <label for="sidebar_bg_5"></label>
                  </span>
                                    <span>
                    <input type="radio" name="sidebar_bg" value="color_6" id="sidebar_bg_6">
                    <label for="sidebar_bg_6"></label>
                  </span>
                                    <span>
                    <input type="radio" name="sidebar_bg" value="color_7" id="sidebar_bg_7">
                    <label for="sidebar_bg_7"></label>
                  </span>
                                    <span>
                    <input type="radio" name="sidebar_bg" value="color_8" id="sidebar_bg_8">
                    <label for="sidebar_bg_8"></label>
                  </span>
                                </li>
                            </ul>
                        </li>
                        <!--切换主题配色-->
                    </ul>

                </div>
            </nav>

        </header>
        <!--End 头部信息-->

        <!--页面主要内容-->
        <main class="lyear-layout-content">

            <div class="container-fluid">
                <iframe src="/toMain" frameborder="0" id="iframeMain" style="width: 100%;height: 85.5vh"></iframe>
            </div>

        </main>
        <!--End 页面主要内容-->
    </div>
</div>

<script type="text/javascript" th:src="@{/Light-Year-Admin/js/jquery.min.js}"></script>
<script type="text/javascript" th:src="@{/Light-Year-Admin/js/bootstrap.min.js}"></script>
<script type="text/javascript" th:src="@{/Light-Year-Admin/js/perfect-scrollbar.min.js}"></script>
<script type="text/javascript" th:src="@{/Light-Year-Admin/js/main.min.js}"></script>
<!--消息提示-->
<script th:src="@{/Light-Year-Admin/js/bootstrap-notify.min.js}"></script>
<script type="text/javascript" th:src="@{/Light-Year-Admin/js/lightyear.js}"></script>
<!--对话框-->
<script th:src="@{/Light-Year-Admin/js/jconfirm/jquery-confirm.min.js}"></script>

<script>
    $(document).ready(function(){

        // 获取session（获取登录者的id）
        var userId = "";
        var userName = "";
        var perms = "";
        $.ajax({
            "url" : "getUserSession",
            "method" : "POST",
            "cache" : false,
            "async" : false,
            success: function (result) {
                if (result.code == 200){
                    userId = result.id;
                    userName = result.name;
                    perms = result.perms;
                    $("#name1").html(perms+"："+userName);
                }
            }
        });

        $("li>a").click(function (e) {
            e.preventDefault();
            $("#iframeMain").attr("src",$(this).attr("href"));
        });

        $("p>a").click(function (e) {
            e.preventDefault();
            $("#iframeMain").attr("src",$(this).attr("href"));
        });
    });

    function signout() {
        window.parent.frames.location.href="/";
    }
</script>
</body>
</html>